package com.lsy.on_line.zaixian.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;

import java.io.Serializable;
import java.util.Date;

/**
 * 播放记录
 *  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 *  `user_id` int(11) DEFAULT NULL,
 *  `video_id` int(11) DEFAULT NULL,
 *  `current_num` int(11) DEFAULT NULL COMMENT '当前播放第⼏集',
 *  `episode_id` int(11) DEFAULT NULL COMMENT '当前播放第⼏集视频id',
 *  `create_time` datetime DEFAULT NULL,
 *  PRIMARY KEY (`id`)
 */
@TableName("play_record")
@ApiModel(value = "PlayRecord对象", description = "视频播放记录表")
public class PlayRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//播放记录表id

    @JsonProperty("user_id")
    private Integer userId;//用户id

    @JsonProperty("video_id")
    private Integer videoId;//视频id

    @JsonProperty("current_num")
    private Integer currentNum;//当前播放第⼏集

    @JsonProperty("episode_id")
    private Integer episodeId;//当前播放第⼏集视频id

    @JsonProperty("create_time")//将驼峰形式的取别名为下划线形式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//日期格式取别名需要转换格式 年月日时分秒 时区为东8区
    private Date createTime;//创建时间(开始观看时间)

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getVideoId() {
        return videoId;
    }

    public void setVideoId(Integer videoId) {
        this.videoId = videoId;
    }

    public Integer getCurrentNum() {
        return currentNum;
    }

    public void setCurrentNum(Integer currentNum) {
        this.currentNum = currentNum;
    }

    public Integer getEpisodeId() {
        return episodeId;
    }

    public void setEpisodeId(Integer episodeId) {
        this.episodeId = episodeId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
